// DebugInfo.cpp : implementation file
//

#include "stdafx.h"
#include "wind.h"
#include "DebugInfo.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


CWnd* pWnd = 0;

/////////////////////////////////////////////////////////////////////////////
// DebugInfo

IMPLEMENT_DYNCREATE(DebugInfo, CFormView)

DebugInfo::DebugInfo()
	: CFormView(DebugInfo::IDD)
{
	//{{AFX_DATA_INIT(DebugInfo)
	m_DebugLog = _T("DebugLog");
	//}}AFX_DATA_INIT
}

DebugInfo::~DebugInfo()
{
}

void DebugInfo::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(DebugInfo)
	DDX_Text(pDX, IDC_EDIT_DEBUG_LOG, m_DebugLog);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(DebugInfo, CFormView)
	//{{AFX_MSG_MAP(DebugInfo)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
	ON_WM_SIZE()
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// DebugInfo diagnostics

#ifdef _DEBUG
void DebugInfo::AssertValid() const
{
	CFormView::AssertValid();
}

void DebugInfo::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// DebugInfo message handlers

int DebugInfo::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{

	if (CFormView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
	
	return 0;
}

void DebugInfo::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
	/*CWnd* */pWnd = this;
	if(pWnd)
	{
		(pWnd->GetDlgItem(IDC_EDIT_DEBUG_LOG))->SetWindowText(__FILE__"   DebugInfo::OnInitialUpdate()\r\n");
	}
	
}

void DebugInfo::OnSize(UINT nType, int cx, int cy)
{
	CFormView::OnSize(nType, cx, cy);
	if (::IsWindow(GetDlgItem(IDC_EDIT_DEBUG_LOG)->GetSafeHwnd()))
   {
      GetDlgItem(IDC_EDIT_DEBUG_LOG)->MoveWindow (0, 0, cx, cy);
   }

}
